package com.x.chalk.service.impl;

import com.x.chalk.dao.HotTopicDao;
import com.x.chalk.service.intf.HotTopicService;
import com.x.chalk.vo.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class HotTopicServiceImpl implements HotTopicService {

    @Autowired
    private HotTopicDao dao;

    //查询全部
    @Override
    public R queryAll() {
        return R.ok(dao.selectList(null));
    }

    //根据评论数量 降序排序
    @Override
    public R queryDesc() {
        return R.ok(dao.queryDesc());
    }
}
